package cn.edu.buu.hospital.entity;

import java.io.Serializable;

/**
 * 科室实体类
 */
public class Department implements Serializable {
    // 科室ID（主键）
    private Long deptid;
    // 科室名称
    private String deptname;
    // 主治疾病
    private String illness;
    // 科室设备
    private String equipment;
    // 所属医院ID（外键）
    private Long hospitalid;
    // 所属医院对象
    private Hospital hospital;
    // 创建时间
    private String createTime;

    // 无参构造方法
    public Department() {
    }

    // 全参构造方法
    public Department(Long deptid, String deptname, String illness, String equipment, Long hospitalid) {
        this.deptid = deptid;
        this.deptname = deptname;
        this.illness = illness;
        this.equipment = equipment;
        this.hospitalid = hospitalid;
    }

    // getter和setter方法
    public Long getDeptid() {
        return deptid;
    }

    public void setDeptid(Long deptid) {
        this.deptid = deptid;
    }

    public String getDeptname() {
        return deptname;
    }

    public void setDeptname(String deptname) {
        this.deptname = deptname;
    }

    public String getIllness() {
        return illness;
    }

    public String getEquipment() {
        return equipment;
    }
    
    public void setEquipment(String equipment) {
        this.equipment = equipment;
    }
    
    public void setIllness(String illness) {
        this.illness = illness;
    }
    
    public Long getHospitalid() {
        return hospitalid;
    }

    public void setHospitalid(Long hospitalid) {
        this.hospitalid = hospitalid;
    }
    
    // 为了兼容JSP页面中的驼峰命名属性
    
    public Hospital getHospital() {
        return hospital;
    }
    
    public void setHospital(Hospital hospital) {
        this.hospital = hospital;
    }

    // toString方法
    @Override
    public String toString() {
        return "Department{" +
                "deptid=" + deptid +
                ", deptname='" + deptname + "'" +
                ", illness='" + illness + "'" +
                ", equipment='" + equipment + "'" +
                ", hospitalid=" + hospitalid +
                ", hospital=" + hospital +
                ", createTime='" + createTime + "'" +
                "}";
    }

    // 修改setDeptId方法
    public void setDeptId(Long deptId) {
        this.deptid = deptId;
    }
    
    // 添加getDeptId方法
    public Long getDeptId() {
        return deptid;
    }
    
    // 添加getDeptName方法
    public String getDeptName() {
        return deptname;
    }
    
    // 添加setDeptName方法
    public void setDeptName(String deptName) {
        this.deptname = deptName;
    }
    
    // getter和setter方法 for createTime
    public String getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    
    // 添加hospitalId的getter和setter方法
    public Long getHospitalId() {
        return hospitalid;
    }
    
    public void setHospitalId(Long hospitalId) {
        this.hospitalid = hospitalId;
    }
}